import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

public class TankClient extends Frame {
    public void lauchFrame() {
        this.setLocation(300, 100);
        this.setSize(800, 600);
        // 添加标题栏文字
        this.setTitle("TankWar");

        // 不需要扩展，使用匿名类，设置窗口可关闭
        this.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });

        // 设置窗口不能修改大小
        this.setResizable(false);
        setVisible(true);
    }

    public static void main(String[] args) {
        TankClient tc = new TankClient();
        tc.lauchFrame();
    }

}
